package com.stan.core.spark.ad.blackList.functions;

import org.apache.spark.api.java.function.Function;
import scala.Serializable;
import scala.Tuple2;

public class SplitArrayFilterFunction
        implements  Function<Tuple2<String, String>, Boolean>, Serializable {

        @Override
        public Boolean call(Tuple2<String, String> stringStringTuple2) throws Exception {
            boolean result = false;
            String adData = stringStringTuple2._2;
            String[] splited = adData.split(" ");
            if(splited.length >= 6){
                result = true;
            }
            return result;
        }
}
